#-*- coding:utf-8 -*-
#!/usr/bin/python
import json
import urllib
import urllib2
def send_warning_msg(title,product_msg,status_msg,content="程序异常，请查看日志，尽快排除！"):

    contentData ={"first":{"value":title,"color":"#000"},
                  "keyword1":{"value":"酒店运营业务线","color":"#173177"},
                  "keyword2":{"value":product_msg,"color":"#173177"},
                  "keyword3":{"value":status_msg,"color":"#173177"},
                  "remark":{"value":content,"color":"#000"}}
    send_data = {
        "group": 910000000,
        "appid": "wxc182a281fde4354b",
        "data": json.dumps(contentData)
    }
    url = "https://wxmonitor.brandwisdom.cn/wechat/notify"
    post_request = urllib2.Request(url,urllib.urlencode(send_data))
    response = urllib2.urlopen(post_request)
    html = response.read()